
#include "stdafx.h"
#include "ConstDef.h"
#include "Logger.h"
#include "ReloadCode.h"
#include "Interface.h"
#include "IoBuffer.h"
#include "Packet.h"
#include "ReloadPacket.h"
#include "ReloadConfigure.h"

namespace ReloadUdpCall
{
	Kind::Kind()
	{

	}

	Kind::~Kind()
	{

	}

	////////////////////////////////////////////////////////////////////////////

	KindBlock::KindBlock()
	{

	}

	KindBlock::~KindBlock()
	{

	}

	///////////////////////////////////////////////////////////////////////////

	OverlayConfiguration::OverlayConfiguration()
	:sequence_(0),topologyPlugin_(OverlayAlgorithmType_ChordReload),nodeIdLength_(16),chordUpdateInterval_(600),chordPingInterval_(3600),chordReactive_(true),maxMessageSize_(5000),
	initialTtl_(100),requiredKinds_()
	{
		KindId kindId = KINDID_GENERIC_SINGLE;
		requiredKinds_[kindId].kind_.kindId_ = kindId;
		requiredKinds_[kindId].kind_.dataModel_ = DataModel_Single;
		requiredKinds_[kindId].kind_.maxCount_ = 1;
		requiredKinds_[kindId].kind_.maxSize_ = 0xffffffff;
		kindId = KINDID_GENERIC_ARRAY;
		requiredKinds_[kindId].kind_.kindId_ = kindId;
		requiredKinds_[kindId].kind_.dataModel_ = DataModel_Array;
		requiredKinds_[kindId].kind_.maxCount_ = 0xffffffff;
		requiredKinds_[kindId].kind_.maxSize_ = 0xffffffff;
		kindId = KINDID_GENERIC_DICTIONARY;
		requiredKinds_[kindId].kind_.kindId_ = kindId;
		requiredKinds_[kindId].kind_.dataModel_ = DataModel_Dictionary;
		requiredKinds_[kindId].kind_.maxCount_ = 0xffffffff;
		requiredKinds_[kindId].kind_.maxSize_ = 0xffffffff;
	}

	OverlayConfiguration::~OverlayConfiguration()
	{
		requiredKinds_.clear();
	}
}
